-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here

-- 设置tab宽度
vim.o.tabstop = 4
vim.bo.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftround = true

vim.o.relativenumber = true

-- 设置缩进宽度
vim.o.shiftwidth = 4
vim.bo.shiftwidth = 4

vim.o.expandtab = true
vim.bo.expandtab = true
vim.o.autoindent = true
vim.bo.autoindent = true
vim.o.smartindent = true
vim.o.cindent = true

vim.o.wrap = true
vim.wo.wrap = true
vim.opt.wrap = true
vim.opt.linebreak = true

vim.o.writebackup = false
vim.o.swapfile = false

-- vim.o.background = "none"

if vim.fn.has('win64') == 1 or vim.fn.has('win32') == 1  then
    -- vim.opt.shellcmdflag = "-c"
    vim.opt.shellcmdflag = "-s"
    -- vim.cmd [[let &shell = '"C:/Program Files/Git/usr/bin/bash.exe"']]
    vim.o.shell = '"C:/Program Files/Git/usr/bin/bash.exe"'
end

vim.opt.scrolloff = 999

vim.opt.fileencodings = { "utf-8", "gbk", "utf-16", "big5" }

vim.opt.cursorlineopt = "line"

vim.opt.cursorline = true

vim.cmd("hi Cursorline gui=underline")
vim.cmd("hi Cursorline cterm=underline")

vim.g.autoformat = false
